import request from '@/utils/request'

// 查询咨询投诉列表
export function listQuestion(query) {
  return request({
    url: '/tws/question/list',
    method: 'get',
    params: query
  })
}

// 查询咨询投诉详细
export function getQuestion(id) {
  return request({
    url: '/tws/question/' + id,
    method: 'get'
  })
}

//查询回复详细
export function answerDetail(data) {
  return request({
    url: '/tws/question/detail',
    method: 'post',
    data:data
  })
}

// 新增咨询投诉
export function addQuestion(data) {
  return request({
    url: '/tws/question',
    method: 'post',
    data: data
  })
}

// 修改咨询投诉
export function updateQuestion(data) {
  return request({
    url: '/tws/question',
    method: 'put',
    data: data
  })
}

// 删除咨询投诉
export function delQuestion(id) {
  return request({
    url: '/tws/question/' + id,
    method: 'delete'
  })
}

// 回复
export function answer(data) {
  return request({
    url: '/tws/question/answer',
    method:'post',
    data:data
  })
}
